import creategamespace as cgs
import gameActions as action
import sys
import os

if __name__ == "__main__":
	print "Welcome to the tenByTen gamespace tester!"
	room = raw_input("What database do you want to open? ")
	con = cgs.openDB(room)
	cur = con.cursor()
	print "Opening was sucessful."
	print "What room do you want to start in?"
	cgs.listRooms(cur)
	room = raw_input("Room #: ")
	while 1 == 1:
		action.lookRoom(cur, room)
		dir = raw_input("Where do you want to go? ")
		if dir[0] in ["Q","q"]:
			sys.exit()
		room = action.movePlayer(cur, room, dir[0].lower())
